<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			li>ul{
				display: none;
			}
			.fisrt>li{
				display: inline-block;
				width: 150px;
				 position: relative;/*子绝父相*/
			}
			li{
				list-style-type: none;
			}
			.fisrt>li:hover>ul{ /*将鼠标悬停在一级菜单时选择对应的二级菜单*/
			
				display: block;
				
				position: absolute;/*子绝父相*/
				left: 50px;
				background-color: red;
			}
			
		</style>
	</head>
	<body>
		<ul class="fisrt">
			<li>一级菜单
				<ul>
					<li>二级菜单</li>
					<li>二级菜单</li>
					<li>二级菜单</li>
				</ul>
			</li>
			<li>一级菜单
				<ul>
					<li>二级菜单</li>
					<li>二级菜单</li>
					<li>二级菜单</li>
				</ul>
			</li>
			<li>一级菜单
			<ul>
				<li>二级菜单</li>
				<li>二级菜单</li>
				<li>二级菜单</li>
			</ul>
			</li>
		</ul>
	</body>
</html>
